package com.day.service.impl;

import com.day.mapper.StudentMapper;
import com.day.pojo.Student;
import com.day.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class StudentServiceImpl implements StudentService {

    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> getStudentList() {
        return studentMapper.getStudentList();
    }

    @Override
    public Student getStudentById(Integer stu_id) {
        return studentMapper.getStudentById(stu_id);
    }

    @Override
    public void addStudent(Student student) {
        studentMapper.addStudent(student);
    }

    @Override
    public void delStudentById(Integer stu_id) {
        studentMapper.delStudentById(stu_id);
    }

    @Override
    public void editStudentById(Student student) {
        studentMapper.editStudentById(student);
    }
}
